package com.example.test_demo.moniMQ;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class Test {
	public static void main(String[] args) {
		Store store = new Store(30);
		//线程池的用法

		  ExecutorService pool = Executors.newFixedThreadPool(4);
		  pool.execute(new CustomThread(store));
		  pool.execute(new ProductThread(store));

		/*
		 * ProductThread productThread = new ProductThread(store); CustomThread
		 * customThread = new CustomThread(store); for (int i = 0; i < 2; i++) { new
		 * Thread(productThread, "productThread"+i).start(); } for (int i = 0; i < 2;
		 * i++) { new Thread(customThread, "customThread"+i).start(); }
		 */
	}

}
